/*****************************************************************
Wowengine - v0.1

File: wen_directInput.cpp
Creation date: 2009-08-05
*****************************************************************/

/****************************************************************/
#ifndef WEN_DIRECTINPUT_H
#define WEN_DIRECTINPUT_H
//----------------------------------------------------------------
#define DIRECTINPUT_VERSION 0x0800
//----------------------------------------------------------------
#include "wen_input.h"
#include <dinput.h>
//----------------------------------------------------------------
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")
/****************************************************************/

namespace wen
{
//----------------------------------------------------------------
class WEN_API DirectInput : public Input
{
	//////////////////////////////////////////////////////
	// TO-DO: DirectInput has to be a singleton!!!!
	//////////////////////////////////////////////////////

private:

	// DirectInput stuff
	LPDIRECTINPUT8 m_pkKeyboardObj;
	LPDIRECTINPUT8 m_pkMouseObj;

	LPDIRECTINPUTDEVICE8 m_pkKeyboardDev;
	LPDIRECTINPUTDEVICE8 m_pkMouseDev;

	DIMOUSESTATE    m_kMouseState;
	HINSTANCE		m_kAppInstance;
	HWND			m_kWindowHandler;

public:

	// constuctor
	DirectInput(HINSTANCE kInstance, HWND kWnd);

	virtual ~DirectInput();

	// overloaded from Input
	bool Init();
	void Update();
	void Deinit();
	void Reset();
	void Acquire();
	void Reacquire();
	void Unacquire();
};
//------------------------------------------------------------------------------
} // end namespace
//------------------------------------------------------------------------------
#endif // WEN_INPUT_H
//------------------------------------------------------------------------------